#ifndef __THREAD_POOL_H__
#define __THREAD_POOL_H__

#include "common/common.h"
#define MAX_LINE 1024

struct task_queue{
    int size;
    int total;
    int head;
    int tail;
    pthread_mutex_t mutex;
    pthread_cond_t cond;
    char** data;
}; 

typedef struct task_queue task_queue;

void tq_init(task_queue *tq, int size);
void tq_push(task_queue *tq, char* str);
void tq_pop(task_queue *tq, char* str);


void* do_work(void* args);

#endif //__THREAD_POOL_H__